package pw.yumc.Residence.commandsub;

import java.util.List;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandException;
import org.bukkit.command.CommandSender;

import cn.citycraft.PluginHelper.commands.BaseCommand;
import pw.yumc.Residence.ResidenceMain;

public class CommandVersion extends BaseCommand {
    ResidenceMain plugin;

    public CommandVersion(final ResidenceMain plugin) {
        super("v");
        this.plugin = plugin;
    }

    @Override
    public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
        sender.sendMessage(ChatColor.GRAY + "------------------------------------");
        sender.sendMessage(ChatColor.RED + "当前服务器运行的 " + ChatColor.GOLD + "Residence" + ChatColor.RED + " 版本: " + ChatColor.BLUE + plugin.getDescription().getVersion());
        sender.sendMessage(ChatColor.GREEN + "创建者: " + ChatColor.YELLOW + "bekvon");
        sender.sendMessage(ChatColor.GREEN + "升级到 1.8 by: " + ChatColor.YELLOW + "DartCZ");
        sender.sendMessage(ChatColor.RED + "升级到最新无UUID版本 by: " + ChatColor.YELLOW + "喵♂呜");
        final List<String> authlist = plugin.getDescription().getAuthors();
        sender.sendMessage(ChatColor.GREEN + "作者: " + ChatColor.YELLOW + authlist.toArray().toString());
        sender.sendMessage(ChatColor.DARK_AQUA + "插件命令列表,帮助, 请查看wiki:");
        sender.sendMessage(ChatColor.GREEN + "http://residencebukkitmod.wikispaces.com/");
        sender.sendMessage(ChatColor.AQUA + "重制版本请查看Jenkins:");
        sender.sendMessage(ChatColor.BLUE + plugin.getDescription().getWebsite());
        sender.sendMessage(ChatColor.GRAY + "------------------------------------");
    }

}
